﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<ChoViet.Site.ViewModels.TopNewsViewModel>" %>
<div style="vertical-align: middle">
    <img src="/images/pvoil/icon.gif" style="vertical-align: middle" />&nbsp;<span class="tit">Tin tức du học</span>
</div>
<div class="lasted">
    <div class="bg_gra"></div>
    <div class="tt_l">
    <%if(Model.Articles.Count()>0) {%>
        <div class="tt_l_img">
            <a href="/Article/Details/<%=Html.Encode(Model.Articles[0].ID)%>"><img src="<%=Html.Encode(Model.Articles[0].ImagePath)%>" width="205" height="155" class="bor_img" /></a>
        </div>
        <div class="tt_l_txt">
            <h3>
                <a href="#" class="gr"><%=Html.Encode(Model.Articles[0].Title)%></a>
            </h3>
            <p> 
                <%=Html.Encode(Model.Articles[0].Summary.Length >= 200 ? Model.Articles[0].Summary.Substring(0,199) + "..." : Model.Articles[0].Summary)%>
            </p>
        </div>
        <div class="clear"></div>
        <%  if (Model.Articles.Count() >= 4)
            {
                for (int i = 1; i <= 3; i++)
                {
             %>
        
        <div class="new_top_3 f_l">
            <p>
                <a href="#">
                    <img class="bor_img" width="118" height="85" src="<%=Model.Articles[i].ImagePath%>" /></a></p>
            <p>
                <a href="/Article/Details/<%=Model.Articles[i].ID%>"><%= Model.Articles[i].Title.Length >= 150 ? Model.Articles[i].Title.Substring(0, 150) + "..." : Model.Articles[i].Title%></a>
            </p>
        </div>
        <%}
            }
      }%>
        <div class="clear"></div>
    </div>
    <div class="tt_r">
        <%Html.RenderPartial("~/Views/Article/HotNews.ascx", Model);%>
    </div>
</div>
